<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>商品店购</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="../../lib/layui-v2.5.5/css/layui.css" media="all">
		<link rel="stylesheet" href="../../css/public.css" media="all">
		<style>
			body {
            	background-color: #ffffff;
        	}
    </style>
	</head>
	<body>
		<form class="layui-form layui-form-pane" lay-filter="myForm" id="app">		
									<div class="layui-col-xs12 layui-col-md6">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">商品名：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.shangpinming" type="text" name="shangpinming" id="shangpinming" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
												<div class="layui-col-xs12 layui-col-md6">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">照片：</label>
					<div v-if="detail.zhaopian" class="layui-input-block">
						<img id="zhaopianImg" style="width: 91px;height: 91px;" :src="detail.zhaopian">
						<input type="hidden" :value="detail.zhaopian" id="zhaopian" name="zhaopian" />
					</div>
				</div>
			</div>
												<div class="layui-col-xs12 layui-col-md6">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">价格：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.jiage" type="text" name="jiage" id="jiage" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
												<div class="layui-col-xs12 layui-col-md6">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">生产日期：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.shengchanriqi" type="text" name="shengchanriqi" id="shengchanriqi" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
												<div class="layui-col-xs12 layui-col-md6">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">保质期：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.baozhiqi" type="text" name="baozhiqi" id="baozhiqi" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
																					<div class="layui-col-xs12 layui-col-md6">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">类别</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.leibie" type="text" name="leibie" id="leibie" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
												<div class="layui-col-xs12 layui-col-md6">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">最近点击时间：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.clicktime" type="text" name="clicktime" id="clicktime" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
												<div class="layui-col-xs12 layui-col-md6">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">点击次数：</label>
					<div class="layui-input-block">
						<input disabled="disabled" v-model="detail.clicknum" type="text" name="clicknum" id="clicknum" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
									
																																							<div class="layui-col-xs12 layui-col-md12">
				<div class="layui-form-item" pane>
					<label class="layui-form-label">详情：</label>
					<div class="layui-input-block">
						<div v-html="detail.xiangqing"></div>
					</div>
				</div>
			</div>
																										</form>

		<script src="../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
		<script src="../../js/lay-config.js?v=2.0.0" charset="utf-8"></script>
		<script src="../../js/utils.js" charset="utf-8"></script>
		<script src="../../js/validate.js" charset="utf-8"></script>
		<script src="../../js/vue.js" charset="utf-8"></script>
		<script>
			var vue = new Vue({
				el: '#app',
				data: {
					detail: {
                                                shangpinming: '',
                                                zhaopian: '',
                                                jiage: '',
                                                shengchanriqi: '',
                                                baozhiqi: '',
                                                xiangqing: '',
                                                leibie: '',
                                                clicktime: '',
                                                clicknum: '',
                                            }
				},
				updated: function() {
					layui.form.render('select', 'myForm');
				},
                computed: {},
				methods: {
					jump(url) {
						jump(url)
					}
				}
			})

			layui.use(['layer', 'element',  'jquery', 'form', 'http'], function() {
				var layer = layui.layer;
				var element = layui.element;
				var http = layui.http;
				var jquery = layui.jquery;
				var form = layui.form;

                var id = http.getParam('id');
				http.request('shangpindiangou/info/' + id, 'get', {}, (res) => {
					form.val(res.data)
					vue.detail = res.data;
				})

			});
		</script>
	</body>
</html>
